﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ClassGrid.aspx.cs" Inherits="School_ClassGrid" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>班级列表</title>
        <link href="../Common/css/main.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        #load{width:500px;height:25px;border:1px #000 solid;}
        #loading{position:absolute;z-index:2;height:23;filter:progid:DXImageTransform.microsoft.gradient(gradienttype=1,startColorStr=white,endColorStr=#39867b);}
        #loadtext{position:absolute;z-index:3;width:100%;height:100%;line-height:23px;text-align:center;}
    </style>
    
    <script type="text/javascript" src="../Common/Js/jquery.js"></script>

    <script type="text/javascript" src="../Common/Js/common.js"></script>

    <script type="text/javascript" src="../Common/Js/msg.js"></script>
    
    <script type="text/javascript" src="../Common/Js/jsUtil.js"></script>
    
    <script type="text/javascript">
    
    var optionType = '';
    var editClassID = 0;
    var GradeID = 0;
    
    function ClassInfo(RID, ClsNo, Grade, ClsName, Divsub, HeaderID, Levels, IsEffect, SchoolMark)
    {
        this.RID = RID;
        this.ClsNo = ClsNo;
        this.Grade = Grade;
        this.ClsName = ClsName;
        this.Divsub = Divsub;
        this.HeaderID = HeaderID;
        this.Levels = Levels;
        this.IsEffect = IsEffect;
        this.SchoolMark = SchoolMark;
        //RID:txtItem.id, ClsNo:txtItem.value.trim(), Grade:0, ClsName:'', Divsub:0, HeaderID:0, Levels:0, IsEffect:true, SchoolMark:''
    }
    
    function ShowAddWindow()
    {

        if (self.parent.currClass <= 0)
        {
            showMassgeBox("提示","请先选择年级，再添加班级信息",1,null);
            return;
        }
         optionType = 'add';
 
        //显示添加班级信息对话框
        ShowPopForm("popTable", "formTitle", "添加班级信息");
        //显示背景遮罩
        ShowMask();    	
    }
    
    function ShowUpdateWindow(obj)
    {
        optionType = 'update';
        ShowPopForm("popTable", "formTitle", "修改班级信息");
        //    document.getElementById('reBind').style.display = "inline"; //显示‘回复保存’按钮
        ShowMask();
        //self.parent.frames['left'].activate = 0;
        var classId = obj.id;
        editClassID = classId;
        
        //要所班级ID，获取班级信息，并显示到界面上去
        PageMethods.GetClassInfoByClsID(classId, function(succ)
        {
           if(succ.length <=0)
                return;
            
            //document.getElementById('txtClassNo').value = succ.ClsNo;
            //document.getElementById('txtClassNo').setAttribute("oldCode",succ.ClsNo);
            
            document.getElementById('txtClassName').value = succ.ClsName;
            document.getElementById('txtClassName').setAttribute("oldCode",succ.ClsName);
            
            document.getElementById('selectDivSub').value = succ.DivSub;
            document.getElementById('selectClassLevel').value = succ.Levels;
            document.getElementById('selectHeader').value = succ.HeaderID;
           

        },function(err){//异步失败
            showMassgeBox("提示",CAUSE_QUERY_FAIL,1,null);
        }) 
        
    }
    
    function DeleteClass(obj)
    {
        showConfirmBox("删除", CLASS_DELETE_SURE, DelClassInfo, obj);        
    }
    
    function DelClassInfo(obj)
    {
        var clsID = obj.id;

        //判断联系表里面是否有这门课程，如果有，则提示不能删除，没有的话，就删除
        PageMethods.GetStudentCountByClsID(clsID, function(succ)
        {
            if (succ>0)
            {
                showMassgeBox("提示",CLASS_DEL_FAIL_HAVE_STUDENT,1,null);
            }
            else
            {
                PageMethods.DeleteClassInfo(clsID, function(succ)
                {
                     if (succ>0)
                     {                    
                        Bind();     
                        showMassgeBox("提示",CLASS_DEL_SUCC,1,null);              
                     } 
                     else
                     {
                        showMassgeBox("提示",CLASS_DEL_FAIL,1,null);
                     }      
                },function(err){
                    showMassgeBox("提示",CLASS_FAIL,1,null);
                })
            }   
        })   
    }
    
    function Save()
    { 

        //var classNo = document.getElementById('txtClassNo').value.Trim();
        var className = document.getElementById('txtClassName').value.Trim();   
        
        var iDivSub = document.getElementById('selectDivSub').value;
        var iLevel = document.getElementById('selectClassLevel').value;
        var iHeaderID = document.getElementById('selectHeader').value;     
        
//        if (classNo == "")
//        {
//            showNoticMsg('txtClassNo',CLASS_CODE_IS_NULL);
//            document.getElementById('txtClassNo').select();              
//            return;
//        }
                
//        if (isNumber(classNo) != true)
//        {
//            showNoticMsg('txtClassNo',CLASS_CODE_NOT_NUMBER);
//            document.getElementById('txtClassNo').select();              
//            return;
//        }    
        
        if (className == "")
        {

            showNoticMsg('txtClassName',CLASS_NAME_NON_FAIL);
            document.getElementById('txtClassName').select();              
            return;
        }
        
        if (containSpecialChar(className) == true)
        {

            showNoticMsg('txtClassName',CLASS_NAME_IS_WRONG);
            document.getElementById('txtClassName').select();              
            return;
        }

        
        if (iHeaderID < 1)
        {
            iHeaderID=-1;
//            showNoticMsg('selectHeader',CLASS_HEADER_NO_SELECT);
//            //document.getElementById('selectHeader').select();  
//            return;
        }
       
        if (optionType == "add")
        {    
            Add(className,iDivSub,iLevel,iHeaderID);
        }
        if (optionType == "update")
        {
            Update(className,iDivSub,iLevel,iHeaderID);
        }        
    }
    
    function Add(className,iDivSub,iLevel,iHeaderID)
    { 
        var ClassInfo = {RID:0,Grade:GradeID,ClsNO:0,ClsName:className,DivSub:iDivSub,HeaderID:iHeaderID,Levels:iLevel,IsEffect:true,ShcoolMark:"11"};

        PageMethods.ValidateUsed(ClassInfo,function(succ){ 
           if(succ > 0)
           {
//                if (succ == 1)
//                {
//                    showNoticMsg('txtClassNo',CLASS_CODE_FAIL);
//                    document.getElementById('txtClassNo').select();  
//                    return;                  
//                }
                
                if (succ == 2)
                {
                    showNoticMsg('txtClassName',CLASS_NAME_FAIL);
                    document.getElementById('txtClassName').select();  
                    return; 
                }
           }
           else
           {  
                PageMethods.AddClassInfo(ClassInfo, function(succ)
                {
                    if (succ > 0)
                    {
                        Bind();
                        CloseMask('popTable');
                    }
                    else
                    {
                        showMassgeBox("提示",CLASS_INSERT_FAIL,1,null);
                    } 	
                },function(err){
                    showMassgeBox("提示",CLASS_INSERT_FAIL,1,null);
                })
           }
        },function(err){
             showMassgeBox("提示",CLASS_FAIL,1,null);
        });
    }
    
    function Update(className,iDivSub,iLevel,iHeaderID)
    { 
        var ClassInfo = {RID:editClassID,Grade:GradeID,ClsNO:0,ClsName:className,DivSub:iDivSub,HeaderID:iHeaderID,Levels:iLevel,IsEffect:true,ShcoolMark:"11"};

        //var oldClsNo = document.getElementById('txtClassNo').getAttribute('oldCode');
        var oldClsName = document.getElementById('txtClassName').getAttribute('oldCode');

        //判断班级编号或班级名称是否修改，先验证后更新
        if (oldClsName != className)
        {
            PageMethods.ValidateUsed(ClassInfo,function(succ){ 
               if(succ > 0)
               {
//                    if (succ == 1)
//                    {
//                        showNoticMsg('txtClassNo',CLASS_CODE_FAIL);
//                        document.getElementById('txtClassNo').select();  
//                        return;                  
//                    }
                    
                    if (succ == 2)
                    {
                        showNoticMsg('txtClassName',CLASS_NAME_FAIL);
                        document.getElementById('txtClassName').select();  
                        return; 
                    }
               }
               else
               {  
                    PageMethods.UpdateClassInfo(ClassInfo, function(succ)
                    {
                        if (succ > 0)
                        {
                            Bind();
                            CloseMask('popTable');
                        }
                        else
                        {
                            showMassgeBox("提示",CLASS_UPDATE_FAIL,1,null);
                        } 	
                    },function(err){
                        showMassgeBox("提示",CLASS_UPDATE_FAIL,1,null);
                    })
               }
            },function(err){
                 showMassgeBox("提示",CLASS_FAIL,1,null);
            });
        }
        //没有修改的情况直接更新
        else
        {
            PageMethods.UpdateClassInfo(ClassInfo, function(succ)
            {
                  if (succ > 0)
                  {
                      Bind();
                      CloseMask('popTable');
                  }
                  else
                  {
                      showMassgeBox("提示",CLASS_UPDATE_FAIL,1,null);
                  } 	
             },function(err){
                  showMassgeBox("提示",CLASS_UPDATE_FAIL,1,null);
           });
        }
    
    }
    
    //初始化教师的下拉框，添充数据
    function InitTeacherList()
    {
        var selectTeacher = document.getElementById('selectHeader');
        
        var oOption = document.createElement("OPTION");
        oOption.text = "请选择";
        oOption.value = 0;
        selectTeacher.add(oOption);
        
        PageMethods.GetAllTeacher(self.parent.currClass,function(succ)
        {            
            if (succ.length > 0)
            {

                
                for(var i = 0; i < succ.length; i++)
                {
                    var newOption = document.createElement("OPTION");
                    newOption.text = succ[i].TeachName;
                    newOption.value = succ[i].RID;
                    selectTeacher.add(newOption);
                }
            }
            else
                showMassgeBox("提示",TEACHER_IS_NULL,1,null);
        },function(err){//异步失败
                   
        })
    }
    
    function ShowMask()
    {
        showMask();
        //self.parent.frames['left'].showMask();
    }
    
    //添加或更新操作成功后清空内容
    function ReleasePopTable()
    {
        //document.getElementById('txtClassNo').value = "";
        document.getElementById('txtClassName').value = ""
        
        document.getElementById("selectHeader").value = 0;
        document.getElementById("selectClassLevel").value = 0;
        document.getElementById("selectDivSub").value = 0;        
        
    }

    function CloseMask(formId)
    {
        //self.parent.frames['left'].activate = 1;
        editCauseID = 0;
        
        ReleasePopTable();
        ClosePopForm(formId,true);
        hideMask();
        //self.parent.frames['left'].hideMask();
    }
    
    function SetHightLight(obj)
    {
         obj.style.backgroundColor = "#fffccf";
         var table = document.getElementById('Table1');
         for(var i =0 ; i < table.rows.length;i++)
         {
            var row = table.rows[i];
            if(row != null && row.id != obj.id)
                row.style.backgroundColor = "#ffffff";
            
         }
    }
    
    
    function Load()
    {
        var arr = new Array();
        var u = window.location.toString();
        u = u.split('?');
        if (typeof(u[1]) == 'string') {
            u=u[1].split('&');
            for(i=0;i<u.length;i++)
            {
                s=u[i].split("=");
                eval('arr["' + s[0] + '"]' + '="' + s[1]+'"');
            }
        }
        var id = arr['id'];
        GradeID = id;
        
        InitTeacherList();
        if (id != null)
        { 
            Bind();
        }
    }
    
    function Bind()
    {
       document.getElementById('HFGradeIDValue').value = GradeID;

       document.getElementById('btnBind').click();  
      
    }
    
    //显示班级课程操作

    //初始化班级课程弹出 Table 内容
    function showTeacherCauseTable(classID)
    {
        
        closeTeacherCause('popClassCauseTable')
        
        
        ShowPopForm("popClassCauseTable", "popClassCauseTitle", "课程信息");
        //显示背景遮罩
        ShowMask(); 
        
        
//        objTr = table.insertRow();
//        objTdLeft = objTr.insertCell();
//        objTdLeft.width = "50%";
//        objTdLeft.innerHTML = "课程";
//        objTdRight = objTr.insertCell();
//        objTdRight.width = "50%";
//        objTdRight.innerHTML = "教师姓名";
     
        PageMethods.GetTeacherCauseByClassId(classID.id, function(succ)
        {
            if (succ.length > 0)
            {
                var table, objTr, objTdLeft, objTdRight;
                //生成表头
                table  = document.getElementById('tableClassCauseList');
    	        //生成表数据
    	        for (var i=0; i<succ.length; i++)
    	        {
    	            objTr = table.insertRow();
    	            objTdLeft = objTr.insertCell();
    	            objTdLeft.innerHTML = succ[i].CauseName;
    	            objTdRight = objTr.insertCell();
    	            objTdRight.innerHTML = succ[i].TeachName;
    	        }
            }     
        },function(err)
        {   //异步失败
            showMassgeBox('提示','获取课程信息失败',1,null);
        })
    }
    
    function closeTeacherCause(formId)
    {
        clearTeacherCauseTableContent();
        ClosePopForm(formId,true);
        hideMask();
    }
    
    //清空班级课程Table内容
    function clearTeacherCauseTableContent()
    {
        var table  = document.getElementById('tableClassCauseList');
       
        //删除全部的表格行
        for(var i=table.rows.length-1;i>0;i--) 
        { 
            table.deleteRow(i); 
        } 

    }
    
    //更新班号操作
    
    //设置班号弹出 Table 内容
    function showClsNoTable()
    {
        closeClsNOTable('popSetClsNOTable');
        
        ShowPopForm("popSetClsNOTable", "popSetClsNOTitle", "设置班号");
        //显示背景遮罩
        ShowMask(); 
        
        var div, table, listTable,objTr, objTdLeft, objTdRight;
        
        listTable = document.getElementById('Table1');
        div = document.getElementById('popSetClsNOTable');
        
        if (listTable==null || div==null)  return;
        
        //生成表头
        table  = document.getElementById('tableClsNOInfo');
        
        for (var i=0; i<listTable.rows.length; i++)
        {
            objTr = table.insertRow();
            
            objTdLeft = objTr.insertCell();
            objTdLeft.width = "50%";
            objTdRight = objTr.insertCell();
            objTdRight.width = "50%";
            if (i == 0)
            {            
                objTdLeft.innerHTML = listTable.rows[i].cells[0].innerHTML;
                objTdRight.innerHTML = listTable.rows[i].cells[1].innerHTML;
            }
            else
            {
                var textField = document.createElement("input"); 
                textField.type = "text";
                textField.id = listTable.rows[i].id;
                textField.style.width = "100px";
                textField.style.textAlign = "right";
                textField.maxLength = "6";
                textField.value = listTable.rows[i].cells[0].innerHTML.trim();
                textField.setAttribute('className','txtStyle'); 
                textField.setAttribute('oldValue', textField.value); 
                
                //////////////////////////////////////////////////////////
                //objTdLeft.innerHTML = '<input type="text" style="width: 100px; text-align:right;" class="txtStyle" maxlength="6" value="' + listTable.rows[i].cells[0].innerHTML.trim() + '" id=" ' + listTable.rows[i].id + '"/>';
                objTdLeft.insertBefore(textField);
                objTdRight.innerHTML = listTable.rows[i].cells[1].innerHTML;
            }
        }
    }
    
    function closeClsNOTable(formId)
    {
        clearClsNOTableTableContent();
        ClosePopForm(formId,true);
        hideMask();
    }
    
    //清空班级课程Table内容
    function clearClsNOTableTableContent()
    {
        var table  = document.getElementById('tableClsNOInfo');
       
        //删除全部的表格行
        for(var i=table.rows.length-1;i>=0;i--) 
        { 
            table.deleteRow(i); 
        }
    }
    
    //保存班级序号
    function SaveClsNO()
    {
        var arrUpdateClsInfo = new Array();
        var arrAllClsInfo = new Array();

        //找到tableClsNOInfo表中所有的文本框元素并组成数组
        var table = document.getElementById('tableClsNOInfo');
        if (table == null)
        {
            showMassgeBox('提示','更新班号失败',1,null);
            return;
        }
        
        var txtItems=table.getElementsByTagName('input');
        for(var i=0;i < txtItems.length;i++){
　　        var txtItem= txtItems[i];
　　        if(txtItem.type==='text'){
              var oldValue = txtItem.getAttribute('oldValue');
　　　        var clsNo = txtItem.value.trim();
　　　        if (oldValue != clsNo)
　　　        {　　　        
　　　            var clsInfo = new ClassInfo(txtItem.id, clsNo, GradeID, '', 0, 0, 0, true, '');
　　　            arrUpdateClsInfo.push(clsInfo);
　　　        }
　　　        var clsInfo = new ClassInfo(txtItem.id, clsNo, GradeID, '', 0, 0, 0, true, '');
　　　        arrAllClsInfo.push(clsInfo);
　　        }
        }
        
        //验证输入的是否是数字并验证数组中是否有重复的数字
        for (var i=0; i<arrAllClsInfo.length; i++)
        {
            if (!isNumber(arrAllClsInfo[i].ClsNo))
            {
                showMassgeBox('提示','班号只能输入正整数',1,null);
                return;
            }
            
            //比较是否有重复的数字
            for (var j=i+1; j<arrAllClsInfo.length; j++)
            {
                if (arrAllClsInfo[i].ClsNo == arrAllClsInfo[j].ClsNo)
                {
                    showMassgeBox('提示','班号不能重复',1,null);
                    return;
                }
            }
        }
        
        if (arrAllClsInfo.length > 0)
        {
             //将数组提交到后台进行批量更新
            PageMethods.UpdateClassNo(arrUpdateClsInfo, function(succ)
            {
                if (succ == 1)
                {
                    showMassgeBox('提示','更新班号成功' ,1,null);
                    Bind();
                }
                else
                    showMassgeBox('提示','更新班号失败' ,1,null);
                   

            },function(err)
            {   //异步失败
                showMassgeBox('提示','更新班号失败，请刷新后重试',1,null);
            })
        }
        
        //关闭对话框和遮罩层
        closeClsNOTable('popSetClsNOTable');
        
    }
    
    
    </script>
</head>
<body onload="Load();">
    <div class="mainWarp">
        <div class="pageBody">
            <form id="form1" runat="server">
            <div>
                <ul class="butList">    
                    <li>
                     <input type="button" id="btnInsert" value="新增" onclick = "ShowAddWindow();" class="commonBut" /></li> 
                     <li><input type="button" id="btnSetClsNO" value="设置班号" onclick = "showClsNoTable();" class="commonBut" /></li>         
                </ul>
            </div>  
            
             <div>
                <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                </asp:ScriptManager>
            </div>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:Repeater ID="Repeater1" runat="server">
                        <HeaderTemplate>

                            <table id="Table1" border="0" cellpadding="0" cellspacing="1" class="useList">
                                <tr class="tableTitle">
                                    <th width="10%" style="text-align:center;padding-left:5px;">班号</th>
                                    <th width="20%" style="text-align:left;padding-left:5px;">班级名称</th>
                                    <th width="17%" style="text-align:left;padding-left:5px;">文理科</th>
                                    <th width="17%" style="text-align:left;padding-left:5px;">班级等级</th>
                                    <th width="16%" style="text-align:left;padding-left:5px;">班主任</th>
                                    <th width="15%" ></th>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr id="<%#DataBinder.Eval(Container.DataItem,"RID")%>" style="background-color:White;"  onclick="SetHightLight(this);">                               
                                <td name="StudentCode" style="text-align:right; font-weight:normal;padding-left:5px;"> 
                                     <%# DataBinder.Eval(Container.DataItem, "ClsNo")%>
                                </td>
                                <td name="StudentName" style="text-align:left; font-weight:normal;padding-left:5px;"> 
                                    <%# DataBinder.Eval(Container.DataItem, "ClsGradeName")%>
                                </td>
                                <td name="Sexy" style="text-align:left; font-weight:normal;padding-left:5px;"> 
                                    <%# DataBinder.Eval(Container.DataItem, "DivSub")%>
                                </td>
                                <td name="Birthday" style="text-align:left; font-weight:normal;padding-left:5px;"> 
                                    <%# DataBinder.Eval(Container.DataItem, "Levels")%>
                                </td>
                                <td name="InSchoolDate" style="text-align:left; font-weight:normal;padding-left:5px;"> 
                                    <%# DataBinder.Eval(Container.DataItem, "Header")%>
                                </td>
                                <td>
                                    <img src="../common/images/hadle_icon.gif" alt="修改班级信息" class="imageBtnStyle" onclick="ShowUpdateWindow(this.parentElement.parentElement)" />
                                    <img src="../common/images/delete_icon.gif" alt="删除班级信息" class="imageBtnStyle" onclick="DeleteClass(this.parentElement.parentElement);" />
                                    <img src="../common/images/c5.gif" alt="查看班级课程信息" class="imageBtnStyle" onclick="showTeacherCauseTable(this.parentElement.parentElement);" />
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                         </FooterTemplate>
                    </asp:Repeater>
                    <%--<webdiyer:aspnetpager id="AspNetPager1" runat="server" horizontalalign="Right"  PageSize="15"  width="100%"   PagingButtonSpacing="10px"  OnPageChanged="AspNetPager1_PageChanged" ButtonImageAlign="left" > </webdiyer:aspnetpager> --%>
                </ContentTemplate>
                
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnBind" EventName="Click" />
                </Triggers>
                
            </asp:UpdatePanel>  
            
            <div style="display: none;">
                <asp:Button ID="btnBind" runat="server" OnClick="btnBind_Click" Text="btnBind" />
                <asp:HiddenField id="HFGradeIDValue" runat="server" Value=""></asp:HiddenField>
                <asp:TextBox ID="txtClassId" Text="" runat="server"></asp:TextBox>
            </div>  
            </form>
    
                <!-- 新增/修改学区弹出界面 开始-->
            <div id="popTable" class="layoutWarp" style="display: none; width: 400px; overflow: inherit;">
                <div class="title">
                    <span id="formTitle">新增</span> <a title="关闭" onclick="return CloseMask('popTable')">
                        关闭</a>
                </div>
                <table style="width: 380px; margin-top: 12px;" border="0" class="layoutTable">
<%--                    <tr>
                        <td align='right' style="width: 168px">班级编号:</td>
                        <td style="text-align: left;color:Red"><input type="text" style="width: 120px" id="txtClassNo" class="txtStyle" maxlength="6" /> *</td>
                    </tr>--%>
                    <tr>
                        <td align='right' style="width: 168px">班级名称:</td>
                        <td style="text-align: left;color:Red" ><input type="text" style="width: 120px" id="txtClassName" class="txtStyle" maxlength="10" /> *</td>
                    </tr>
                    <tr>
                        <td align='right' style="width: 168px">文 理 科:</td>
                        <td align="left">
                            <select id="selectDivSub" style="width: 120px">
                            <option value="0">无分科</option>
                            <option value="1">文科</option>
                            <option value="2">理科</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align='right' style="width: 168px; height: 24px;">班级等级:</td>
                        <td align="left" style="height: 24px">
                            <select id="selectClassLevel" style="width: 120px">
                            <option value="0">普通班</option>
                            <option value="1">重点班</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align='right' style="width: 168px">班 主 任:</td>
                        <td style="text-align: left;color:Red">
                            <select id="selectHeader" style="width: 120px">
                            </select></td>
                    </tr>
                    
                    
                    <tr>
                        <td colspan="3" align="center">
                            <ul class="butList">
                                <input type="button" id="btnsave" value="保存" onclick="Save()" class="commonBut" />
                                <input type="button" value="取消" onclick=" CloseMask('popTable');" class="commonBut" />
                            </ul>
                        </td>
                    </tr>
                </table>
            </div>
            <!-- 新增/修改学区弹出界面 结束 -->
            
            <!-- 查看班级任课信息 -->
            <div id="popClassCauseTable" class="layoutWarp" style="display: none; width: 400px; overflow: inherit;">
                <div class="title">
                    <span id="popClassCauseTitle">新增</span> <a title="关闭" onclick="return closeTeacherCause('popClassCauseTable')">
                        关闭</a>
                </div><!--class="layoutTable"-->
                <table style="width: 380px; margin-top: 12px; margin-bottom: 12px;" border="0">
                    <tr>
                        <td colspan="3" valign="top">
                            <div id="divClassCauseList" style="height: 170px; display: block; overflow: auto; width: 95%" >
                                <table id="tableClassCauseList" border="1" cellpadding="0" cellspacing="1" bordercolor="#c3dce5" class="useList" style="width:90%;" >
                                    <th >课程</th>
                                    <th >教师姓名</th>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3" align="center">
                            <ul class="butList">
                                <input type="button" value="关闭" onclick=" closeTeacherCause('popClassCauseTable');" class="commonBut" />
                            </ul>
                        </td>
                    </tr>
                </table>
            </div>
            <!-- 查看班级任课信息 结束-->
            
            <!-- 设置班号 -->
            <div id="popSetClsNOTable" class="layoutWarp" style="display: none; width: 400px; overflow: inherit;">
                <div class="title">
                    <span id="popSetClsNOTitle">新增</span> <a title="关闭" onclick="return closeClsNOTable('popSetClsNOTable')">
                        关闭</a>
                </div>
                <table style="width: 380px; margin-top: 12px; margin-bottom: 12px;" border="0">
                    <tr>
                        <td colspan="3" valign="top">
                            <div id="div2" style="height: 250px; display: block; overflow: auto; width: 95%" >
                                <table id="tableClsNOInfo" border="1" cellpadding="0" cellspacing="1" bordercolor="#c3dce5" class="useList" style="width:90%;" >
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3" align="center">
                            <ul class="butList">
                                <input type="button" id="btnSaveClsNO" value="保存" onclick="SaveClsNO();" class="commonBut" />
                                <input type="button" value="关闭" onclick="closeClsNOTable('popSetClsNOTable');" class="commonBut" />
                            </ul>
                        </td>
                    </tr>
                </table>
            </div>
            <!-- 设置班号 结束-->
            
        </div>
    </div>
</body>
</html>
